import Layout from "@/layout/index.vue";

export const constantRoute = [
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'layout',
        meta: {
            title: '',
            hidden: false,
            icon: '',
        },
        redirect: '/panel',
        children: [
            {
                path: '/panel',
                component: () => import('@/views/home/index.vue'),
                meta: {
                    title: '终端面板',
                    hidden: false,
                    icon: 'Monitor',
                }
            }
        ]
    },

    // 商品管理
    {
        path: '/goods',
        component: () => import('@/layout/index.vue'),
        name: 'GoodsManager',
        meta: {
            title: '商品管理',
            hidden: false,
            icon: 'Goods'
        },
        redirect: '/goods/brand',
        children: [{
            path: '/goods/brand',
            component: () => import('@/views/product/brand/index.vue'),
            name: 'Brand',
            meta: {
                title: '品牌管理',
                hidden: false,
                icon: 'Star'
            },
        }, {
            path: '/goods/attribute',
            component: () => import('@/views/product/attribute/index.vue'),
            name: 'Attribute',
            meta: {
                title: '属性管理',
                hidden: false,
                icon: 'CollectionTag'
            },
        }, {
            path: '/goods/spu',
            component: () => import('@/views/product/spu/index.vue'),
            name: 'SPU',
            meta: {
                title: 'SPU管理',
                hidden: false,
                icon: 'ShoppingBag'
            },
        }, {
            path: '/goods/sku',
            component: () => import('@/views/product/sku/index.vue'),
            name: 'SKU',
            meta: {
                title: 'SKU管理',
                hidden: false,
                icon: 'Sell'
            },
        }, {
            path: '/goods/attribute',
            component: () => import('@/views/product/attribute/index.vue'),
            name: 'Category',
            meta: {
                title: '分类管理',
                hidden: false,
                icon: 'Filter'
            },
        }
        ]
    },
    // 订单管理
    {
        path: '/store-orders-manager',
        component: Layout,
        name: 'StoreOrdersManager',
        meta: {
            title: '订单管理',
            hidden: false,
            icon: 'Document'
        },
        redirect: '/store-orders-manager/edit',
        children: [{
            path: '/store-orders-manager/edit',
            component: () => import('@/views/order/orderEdit/index.vue'),
            name: 'OrdersEdit',
            meta: {
                title: '订单编辑',
                hidden: false,
                icon: 'TakeawayBox'
            },
        }, {
            path: '/store-orders-manager/aftersales',
            component: () => import('@/views/order/afterSales/index.vue'),
            name: 'AfterSales',
            meta: {
                title: '售后管理',
                hidden: false,
                icon: 'Service'
            },
        }
        ]
    },
    // 用户管理
    {
        path: '/users',
        component: Layout,
        name: 'PersonalCenter',
        meta: {
            title: '用户管理',
            hidden: false,
            icon: 'User'
        },
        redirect: '/users/query',
        children: [{
            path: '/users/query',
            component: () => import('@/views/users/query/index.vue'),
            meta: {
                title: '用户查询',
                hidden: false,
                icon: 'Search'
            },
        },
        {
            path: '/users/permissions',
            component: () => import('@/views/users/permissionManager/index.vue'),
            meta: {
                title: '权限管理',
                hidden: false,
                icon: 'Lock'
            },
        },
        ]
    },
    // 网站管理
    {
        path: '/website',
        component: Layout,
        name: 'WebsiteeManager',
        meta: {
            title: '网站管理',
            hidden: false,
            icon: 'SetUp',
        },
        redirect: '/website/carousel',
        children: [{
            path: '/website/carousel',
            component: () => import('@/views/website/storeCarousel/index.vue'),
            name: 'Carousel',
            meta: {
                title: '轮播图管理',
                hidden: false,
                icon: 'Picture'
            },
        }, {
            path: '/website/announcement',
            component: () => import('@/views/website/storeAnnouncement/index.vue'),
            name: 'Announcement',
            meta: {
                title: '公告管理',
                hidden: false,
                icon: 'Notification'
            },
        }, {
            path: '/website/top-menu',
            component: () => import('@/views/website/topMenu/index.vue'),
            name: 'TopMenu',
            meta: {
                title: '菜单管理',
                hidden: false,
                icon: 'Guide'
            },
        }, {
            path: '/website/setting',
            component: () => import('@/views/website/set/index.vue'),
            name: 'Set',
            meta: {
                title: '网站设置',
                hidden: false,
                icon: 'Setting'
            },
        }
        ]
    },
    // 关于本站
    {
        path: '/about',
        component: Layout,
        name: 'about',
        meta: {
            title: '关于本站',
            hidden: false,
            icon: ''
        },
        redirect: '/about',
        children: [
            {
                path: '/about',
                component: () => import('@/views/about/index.vue'),
                meta: {
                    title: '关于本站',
                    hidden: false,
                    icon: 'Warning'
                }
            }
        ]
    },
    // 登录
    {
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'login',
        meta: {
            title: '登录',
            hidden: true,
        },
    },
    // 404
    {
        path: '/404',
        component: () => import('@/views/404/index.vue'),
        name: '404',
        meta: {
            title: '404',
            hidden: true,
        },
    },
]
// 异步路由
export const asyncRoute = [

]

// 任意路由
export const anyRoute = {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
        title: '任意路由',
        hidden: true,
    },
}